﻿using System;
using System.Collections;
using System.Collections.Generic;
using Robotlegs.Bender.Extensions.CommandCenter.API;
using Robotlegs.Bender.Extensions.EventManagement.API;
using UnityEngine;

public class AddCommand : ICommand
{
	[Inject]
	public ScoreModel scoreModel;

	[Inject]
	public IEventDispatcher dispatcher;

	public void Execute()
	{
		int score = scoreModel.Add();

		//向View派发Model数据
		dispatcher.Dispatch(new CommandEvent(CommandEvent.Type.ADD, score));
	}
}
